Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid custom MCU definition being redefined as NRF52832 #531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

needs-coffee
Copy link

the CPP Define NRF52 becomes defined in the nrf5.py file (by "%s" % board.get("build.mcu", "")[0:5].upper(),)
This definition sets the MCU to NRF52832 for backwards compatibility.

The NRF52840 has 2 GPIO ports (P0 with 32 GPIOs and P1 with 16 GPIOs)

Using an NRF52840 MCU on a custom board or the NRF52_dk (PCA10056) board results in only being able to access P0 due to the MCU being defined as NRF52832, resulting in GPIO_COUNT == 1

This does not allow the P1 pins to be accessed (P1.00 > P1.15)
These pins are used for the Arduino style header on the PCA10056 board.

This fix checks for an existing MCU definition and will not redefine this as NRF52832 (which only has as single GPIO port)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant